package com.yanmaohu.yulia.bean;

/**
 * @author Bright Lee
 */
public final class EndField {

    private int beginIndex;
    private int endIndex;
    private NonSecondPrimaryDatetimeField nonSecondPrimaryDatetimeField;
    private UnsignedInteger intervalFractionalSecondsPrecision;

    public EndField(NonSecondPrimaryDatetimeField nonSecondPrimaryDatetimeField) {
        this.beginIndex = nonSecondPrimaryDatetimeField.getBeginIndex();
        this.endIndex = nonSecondPrimaryDatetimeField.getEndIndex();
        this.nonSecondPrimaryDatetimeField = nonSecondPrimaryDatetimeField;
    }

    public EndField(int beginIndex, int endIndex, UnsignedInteger intervalFractionalSecondsPrecision) {
        this.beginIndex = beginIndex;
        this.endIndex = endIndex;
        this.intervalFractionalSecondsPrecision = intervalFractionalSecondsPrecision;
    }

    public EndField(int beginIndex, int endIndex) {
        this(beginIndex, endIndex, null);
    }

    public int getBeginIndex() {
        return beginIndex;
    }

    public int getEndIndex() {
        return endIndex;
    }

    public NonSecondPrimaryDatetimeField getNonSecondPrimaryDatetimeField() {
        return nonSecondPrimaryDatetimeField;
    }

    public UnsignedInteger getIntervalFractionalSecondsPrecision() {
        return intervalFractionalSecondsPrecision;
    }

}
